<?php
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
if ($curruser['acl'] == 255 && $curruser['prev_id'] != 0 && !SubAccountRight($curruser, 2))
{
    exit();
}
if (isset($_SESSION['subaccount']) && $curruser['acl'] < 255)
{
    exit();
}
if ($curruser['enabled'] == 2)
{
    exit();
}
header("Content-type: text/xml");
header("Cache-Control: no-cache");
$para = getVar("para");
$account = getVar("account");
switch ($para)
{
    case 1 :
        $db = new DB();
        $qry = $db->query("SELECT `id`,`acl` FROM `k_user` WHERE `account`='" . $account . "' LIMIT 1");
        $rlt = mysql_fetch_array($qry);
        echo "<?xml version=\"1.0\"?>\n";
        echo "<response>\n";
        echo "\t<result>\n";
        echo "\t\t<id>" . trim($rlt['id']) . "</id>\n";
        echo "\t\t<acl>" . trim($rlt['acl']) . "</acl>\n";
        echo "\t</result>\n";
        echo "</response>";
        break;
    case 2 :
        include_once( "class/class.tree_chk.php" );
        $a = new tree_chk();
        $a->acct_Recursive($curruser['account']);
        echo "<?xml version=\"1.0\"?>\n";
        echo "<response>\n";
        echo "\t<result>\n";
        echo "\t\t<serach>" . $a->is_serach($account) . "</serach>\n";
        echo "\t</result>\n";
        echo "</response>";
        break;
}
?>